Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add correct test coverage branch detection #12551

Merged
merged 1 commit into from
Sep 18, 2018

Conversation

marcoabreu
Copy link
Contributor

@marcoabreu marcoabreu commented Sep 13, 2018

This PR adds explicit commit, branch and PR detection and thus overrides the auto-detection of CodeCov. This is due to the fact that our merging strategy creates a temporary commit. CodeCov is not able to properly reference that temporary merge commit back to the PR.

Fixes #12564

@marcoabreu marcoabreu changed the title Add correct test coverage branch detection [WIP] Add correct test coverage branch detection Sep 13, 2018
@marcoabreu marcoabreu added the pr-work-in-progress PR is still work in progress label Sep 13, 2018
@marcoabreu marcoabreu force-pushed the fix-codecov-hash-detection branch 8 times, most recently from fdc0b76 to 143d0a8 Compare September 18, 2018 14:44
@marcoabreu marcoabreu changed the title [WIP] Add correct test coverage branch detection Add correct test coverage branch detection Sep 18, 2018
@marcoabreu marcoabreu added pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress labels Sep 18, 2018
@szha
Copy link
Member

szha commented Sep 18, 2018

how do you intend to test?

@marcoabreu
Copy link
Contributor Author

I test by looking into the report that's being created. For example, if you look at http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/PR-12563/12/pipeline/958/ (that's another PR, I just picked a random one), you can see the following output:

[ut-clojure-cpu] Running shell script

+ bash -s -

+ curl --retry 10 -s https://codecov.io/bash



  _____          _

 / ____|        | |

| |     ___   __| | ___  ___ _____   __

| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /

| |___| (_) | (_| |  __/ (_| (_) \ V /

 \_____\___/ \__,_|\___|\___\___/ \_/

                              Bash-0b37652





==> Jenkins CI detected.

    project root: .

    Fixing merge commit SHA

--> token set from env

    Yaml found at: .codecov.yml

==> Running gcov in . (disable via -X gcov)

==> Python coveragepy not found

==> Searching for coverage reports in:

    + .

    -> Found 3 reports

==> Detecting git/mercurial file structure

==> Reading reports

    + ./contrib/clojure-package/data/cifar/train.lst bytes=1919572

    + ./contrib/clojure-package/data/cifar/test.lst bytes=374885

    + ./contrib/clojure-package/target/coverage/codecov.json bytes=17050

==> Appending adjustments

    http://docs.codecov.io/docs/fixing-reports

    + Found adjustments

==> Gzipping contents

==> Uploading reports

    url: https://codecov.io

    query: branch=PR-12563&commit=d8c51e5fbe1e50a855bc84dacd6061533d6d6a3c&build=12&build_url=http%3A%2F%2Fjenkins.mxnet-ci.amazon-ml.com%2Fjob%2Fincubator-mxnet%2Fjob%2FPR-12563%2F12%2F&name=&tag=&slug=apache%2Fincubator-mxnet&service=jenkins&flags=&pr=12563&job=

    -> Pinging Codecov

    -> Uploading

    -> View reports at https://codecov.io/github/apache/incubator-mxnet/commit/d8c51e5fbe1e50a855bc84dacd6061533d6d6a3c

The last line contains a link to the report. Here you can see that it points to d8c51e5, but that runs' commit is actually 'd6f3b93ccb1b755c6f19660ec7617f2a9bef5f85'.

To validate, I will make sure that these two hashes are equal.

@marcoabreu marcoabreu added pr-awaiting-merge Review and CI is complete. Ready to Merge and removed pr-awaiting-review PR is waiting for code review labels Sep 18, 2018
@marcoabreu marcoabreu merged commit 6dca0c6 into apache:master Sep 18, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-merge Review and CI is complete. Ready to Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants